const mongoose = require('mongoose')
const Schema = mongoose.Schema
const { ObjectId, Date, Number, Boolean, String } = Schema.Types

const Order = Schema({
    orderid: ObjectId,
    userid: ObjectId,
    addressid: ObjectId,
    proid: ObjectId,
    // 0-新订单 1-已发货 2-已完成 3-退货申请 4-退货成功 5-待支付
    state: Number,
    count: Number,
    msg: String,
    // 尺码
    size: String,
    time: Date,
    operation: Date,
    comment: Boolean
})

module.exports = Order
